package com.adwin.addcoin.ui.dialog

import android.content.ClipData.newIntent
import android.content.Context
import android.content.Intent
import android.provider.Settings
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup.LayoutParams
import androidx.core.content.ContextCompat
import androidx.core.content.ContextCompat.startActivity
import com.adwin.addcoin.base.BaseDialog
import com.adwin.addcoin.databinding.DialogGaidBinding


class GaidDialog(val mContext: Context): BaseDialog(mContext) {
    override fun getGravity(): Int = Gravity.CENTER

    override fun getWidth(): Int = LayoutParams.MATCH_PARENT

    override fun getHeight(): Int = LayoutParams.MATCH_PARENT
    lateinit var binding: DialogGaidBinding

    override fun initLayout(): View {
        binding = DialogGaidBinding.inflate(LayoutInflater.from(mContext))
        return binding.root
    }

    override fun onStart() {
        super.onStart()
    }

    override fun initData() {
        binding.tvGaidClick.setOnClickListener {
            val intent = Intent(Settings.ACTION_SETTINGS)
            mContext.startActivity(intent)
        }
    }
}